package com.ruoyi.ams.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ams.domain.AmsOwnUserAssetAuthority;
import com.ruoyi.ams.domain.vo.ApplyHistoryInifo;
import com.ruoyi.ams.domain.vo.ApplyUnlockAuthVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物联网资产设备用户权限信息Mapper接口
 * 
 * @author yfkj
 * @date 2021-10-15
 */@Mapper
public interface AmsOwnUserAssetAuthorityMapper extends BaseMapper<AmsOwnUserAssetAuthority>
{
    /**
     * 查询物联网资产设备用户权限信息
     * 
     * @param ownUserAssetAuthorityId 物联网资产设备用户权限信息主键
     * @return 物联网资产设备用户权限信息
     */
    public AmsOwnUserAssetAuthority selectAmsOwnUserAssetAuthorityByOwnUserAssetAuthorityId(Long ownUserAssetAuthorityId);

    /**
     * 查询物联网资产设备用户权限信息列表
     * 
     * @param amsOwnUserAssetAuthority 物联网资产设备用户权限信息
     * @return 物联网资产设备用户权限信息集合
     */
    public List<AmsOwnUserAssetAuthority> selectAmsOwnUserAssetAuthorityList(AmsOwnUserAssetAuthority amsOwnUserAssetAuthority);

    /**
     * 新增物联网资产设备用户权限信息
     * 
     * @param amsOwnUserAssetAuthority 物联网资产设备用户权限信息
     * @return 结果
     */
    public int insertAmsOwnUserAssetAuthority(AmsOwnUserAssetAuthority amsOwnUserAssetAuthority);

    /**
     * 修改物联网资产设备用户权限信息
     * 
     * @param amsOwnUserAssetAuthority 物联网资产设备用户权限信息
     * @return 结果
     */
    public int updateAmsOwnUserAssetAuthority(AmsOwnUserAssetAuthority amsOwnUserAssetAuthority);

    /**
     * 删除物联网资产设备用户权限信息
     * 
     * @param ownUserAssetAuthorityId 物联网资产设备用户权限信息主键
     * @return 结果
     */
    public int deleteAmsOwnUserAssetAuthorityByOwnUserAssetAuthorityId(Long ownUserAssetAuthorityId);

    /**
     * 批量删除物联网资产设备用户权限信息
     * 
     * @param ownUserAssetAuthorityIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAmsOwnUserAssetAuthorityByOwnUserAssetAuthorityIds(Long[] ownUserAssetAuthorityIds);

    List<ApplyUnlockAuthVo> getApplyInfoByGrantId(@Param("grantUserId") Long grantUserId, @Param("status") Integer status);

    List<ApplyUnlockAuthVo> getApplyInfoByDeptId(@Param("deptId") Long deptId, @Param("status") Integer status);

    List<ApplyHistoryInifo> getApplyHistoryInfos(@Param("userId") Long userId);
}
